package com.freewater.cargotracker.domain.model.handlingevent;

import com.freewater.cargotracker.domain.model.location.UnLocode;

public class UnknownLocationException extends CannotCreateHandlingEventException {

    private static final long serialVersionUID = 1L;

    private UnLocode unLocode;

    public UnknownLocationException(UnLocode unLocode) {
        this.unLocode = unLocode;
    }

    @Override
    public String getMessage() {
        return "No location with un locode " + unLocode.getCode()
                + " exists in the system";
    }
}
